Skip to content

Comments

[Feat/#5] text field#8

Merged
ahcgnoej merged 5 commits intodevelopfrom
feat/#5-text-field
Feb 22, 2026
Merged

[Feat/#5] text field#8
ahcgnoej merged 5 commits intodevelopfrom
feat/#5-text-field

Conversation

@ahcgnoej
Copy link
Contributor

📝 요약

  • FormField 공통 컴포넌트 구현

⚙️ 작업 내용

  • zod, React-hook-form 설치
  • FormField 공통 컴포넌트 구현

🔗 관련 이슈

✅ 체크리스트

  • 코딩 컨벤션(Biome/Lint)을 준수하였습니다.
  • 모든 타입 에러를 해결하였습니다. (Typecheck)
  • 변경 사항에 대한 테스트를 마쳤습니다.
  • 불필요한 로그(console.log)를 제거하였습니다.

💬 리뷰어에게

  • 사용 예시 이해를 위한 README 첨부했습니다. src/shared/ui/FormField/README.md
image

@ahcgnoej ahcgnoej self-assigned this Feb 17, 2026
@ahcgnoej ahcgnoej linked an issue Feb 17, 2026 that may be closed by this pull request
2 tasks
@ahcgnoej ahcgnoej added the feature 새로운 기능 구현 label Feb 17, 2026
@github-actions
Copy link

Thanks for the contribution!
I have applied any labels matching special text in your title and description.

Please review the labels and make any necessary changes.

@gemini-code-assist
Copy link

Summary of Changes

Hello @ahcgnoej, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 react-hook-formzod와 통합된 재사용 가능한 FormField 공통 컴포넌트를 도입합니다. 이 컴포넌트는 폼 상태 관리, 유효성 검사 오류 표시, 디자인 시스템 일관성 유지, 그리고 라벨, 헬퍼 텍스트, 오른쪽 요소와 같은 추가 기능을 지원하여 React Native 애플리케이션에서 폼 입력을 간소화하는 것을 목표로 합니다.

Highlights

  • 공통 FormField 컴포넌트 구현: React Native 환경에서 폼 입력을 쉽게 만들기 위한 재사용 가능한 FormField 공통 컴포넌트가 구현되었습니다. 이 컴포넌트는 React Hook Form을 기반으로 폼 상태 관리, 유효성 검사, 디자인 시스템 스타일 일관성을 지원합니다.
  • 새로운 라이브러리 설치: 폼 유효성 검사 및 관리를 위해 zodreact-hook-form 라이브러리가 프로젝트에 추가되었습니다.
  • Babel 설정 업데이트: 절대 경로 임포트를 용이하게 하기 위해 Babel 설정에 module-resolver 플러그인이 추가되었습니다.
  • FormField 사용 가이드 추가: 새로 추가된 FormField 컴포넌트의 사용법, Props 설명, 유효성 검사 동작 방식 등을 상세히 설명하는 README.md 파일이 추가되었습니다.
Changelog
  • babel.config.js
    • 모듈 리졸버 플러그인이 추가되었습니다.
  • package.json
    • @hookform/resolvers, react-hook-form, zod 의존성이 추가되었습니다.
  • src/shared/ui/FormField/FormField.tsx
    • React Hook Form의 Controller를 활용하는 메인 FormField 컴포넌트가 추가되었습니다.
  • src/shared/ui/FormField/FormFieldHelper.tsx
    • FormField 컴포넌트의 헬퍼 텍스트를 표시하는 컴포넌트가 추가되었습니다.
  • src/shared/ui/FormField/FormFieldInput.tsx
    • 입력 필드의 외형(appearance) 및 오류 상태를 처리하는 FormField용 입력 컴포넌트가 추가되었습니다.
  • src/shared/ui/FormField/FormFieldLabel.tsx
    • FormField 컴포넌트의 라벨을 표시하는 컴포넌트가 추가되었습니다.
  • src/shared/ui/FormField/Input.tsx
    • 외형 및 상태 기반 스타일링을 지원하는 또 다른 입력 컴포넌트가 추가되었습니다.
  • src/shared/ui/FormField/README.md
    • FormField 컴포넌트의 사용법과 기능에 대한 상세한 설명서가 추가되었습니다.
  • src/shared/ui/FormField/index.ts
    • FormField 관련 컴포넌트와 타입을 내보내는 인덱스 파일이 추가되었습니다.
  • src/shared/ui/FormField/types.ts
    • FormField 컴포넌트 및 관련 속성에 대한 타입 정의가 추가되었습니다.
  • yarn.lock
    • 새로운 의존성 추가에 따라 패키지 잠금 파일이 업데이트되었습니다.
Activity
  • 작성자는 PR 설명에 명시된 코딩 컨벤션, 타입 에러 해결, 테스트 완료, 불필요한 로그 제거 등의 체크리스트 항목을 모두 완료했습니다.
  • 리뷰어의 이해를 돕기 위해 src/shared/ui/FormField/README.md 파일에 사용 예시를 첨부했습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이 PR은 react-hook-formzod를 사용하여 공통 FormField 컴포넌트를 구현합니다. 전반적으로 컴포넌트 구조와 README 문서는 잘 작성되었습니다. 그러나 몇 가지 개선점을 발견했습니다. 가장 중요한 점은 유효성 검사 에러 메시지가 사용자에게 표시되지 않는 버그입니다. 또한, 에러 메시지를 시각적으로 구분할 수 있도록 스타일링을 추가하고, 사용되지 않는 것으로 보이는 Input.tsx 파일을 정리하는 것을 제안합니다. 자세한 내용은 각 파일에 남긴 리뷰 코멘트를 참고해주세요.

render={({ field, fieldState }) => {
//todo: 일단 에러메세지 추출만 함
const errorMessage = fieldState.error?.message;
const message = helperText;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

유효성 검사 에러 메시지가 사용자에게 표시되지 않고 있습니다. errorMessage를 계산했지만, helperTextmessage 변수에 할당되어 FormFieldHelper로 전달됩니다. README.md에 명시된 대로 에러가 발생했을 때 에러 메시지를 보여주려면, errorMessage가 있을 때 helperText 대신 이 값을 사용해야 합니다.

Suggested change
const message = helperText;
const message = errorMessage ?? helperText;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

에러메세지 추출만 함 확장가능성 보이면 확장하고 에러메세지 안 쓸 거 같으면 에러 판단만 할 예정

Comment on lines 5 to 20
type Props = {
children: ReactNode;
};

export function FormFieldHelper({ children }: Props) {
return (
<Text
className="mt-3 text-[11px] text-right"
style={{
color: colorTokens.contentSecondary,
}}
>
{children}
</Text>
);
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

현재 FormFieldHelper는 한 가지 색상만 지원하여 일반 도움말과 에러 메시지를 시각적으로 구분할 수 없습니다. 에러 메시지를 표시할 때 사용자가 명확히 인지할 수 있도록 isError와 같은 prop을 추가하여 텍스트 색상을 동적으로 변경하는 것을 제안합니다. 예를 들어, 에러일 경우 빨간색으로 표시할 수 있습니다.

Suggested change
type Props = {
children: ReactNode;
};
export function FormFieldHelper({ children }: Props) {
return (
<Text
className="mt-3 text-[11px] text-right"
style={{
color: colorTokens.contentSecondary,
}}
>
{children}
</Text>
);
}
type Props = {
children: ReactNode;
isError?: boolean;
};
export function FormFieldHelper({ children, isError }: Props) {
return (
<Text
className="mt-3 text-[11px] text-right"
style={{
color: isError ? colorTokens.danger : colorTokens.contentSecondary,
}}
>
{children}
</Text>
);
}

@chunjaemin chunjaemin requested review from chunjaemin and removed request for chunjaemin February 17, 2026 14:19
Copy link
Contributor

@chunjaemin chunjaemin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

텍스트필드 잘 구현해주셨군요 고생하셨습니다!!

다만 현재 존재하지 않는 tokens파일을 쓰셨다 보니까 CI typecheck를 통과하시지 못한 것으로 나오는 것 같아요(채정님 말씀대로 feat/#6브랜치와 merge 되면 문제는 없을 듯 합니다.)

feat/#6 브랜치 먼저 merge한 후, 업데이트 된 develop 브랜치 기준(tokens파일이 존재하는 시점)에서 다시 PR요청 보내주시면 좋을 것 같습니다!

@ahcgnoej ahcgnoej requested a review from chunjaemin February 21, 2026 10:20
Copy link
Contributor

@taegeon2 taegeon2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FormField
FormFieldInput
등등 FormField 컴포넌트의 역할이 적절히 분리되어있어 재사용성 부분에서 좋은 것 같습니다.!

제미나이 코드 리뷰에서도 나타났는데, 에러 상태에서의 UI 변경..? 도 있으면 좋을거 같은데 추후 이야기해보면 좋을거 같습니다!

@ahcgnoej ahcgnoej changed the title Feat/#5 text field [Feat/#5] text field Feb 22, 2026
@ahcgnoej ahcgnoej merged commit 77e7d4b into develop Feb 22, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature 새로운 기능 구현

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT/#5] 공통컴포넌트 텍스트필드 구현

4 participants